package blJunitTest;

import static org.junit.Assert.*;

import java.rmi.RemoteException;
import java.util.Map;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import po.SelectRecordPO;

import bl.CourseScoreBLImpl;

public class CourseScoreBLImplTest {

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}



	@Test
	public void testGetStudentScore() {
//		fail("Not yet implemented");
		int selectRecordID = 1;
			try {
				assertEquals(new CourseScoreBLImpl().getStudentScore(selectRecordID), 20);
			} catch (RemoteException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
	}

	@Test
	public void testGetCourseStatics() {
//		fail("Not yet implemented");
		int courseID = 1;
		Map<Integer, SelectRecordPO> studentMap = null;
		try {
			assertEquals(new CourseScoreBLImpl().getCourseStatics(courseID), studentMap);
		} catch (RemoteException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	@Test
	public void testGetStudentGPA() {
//		fail("Not yet implemented");
		int studentID = 1;
		try {
			assertEquals(new CourseScoreBLImpl().getStudentGPA(studentID), 4.5);
		} catch (RemoteException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
